package tianwang.utils.dict;

import java.util.Map;

public class DictionaryStoreImpl implements DictionaryStore{

	private Map<String, Dictionary> dicts = null;

	public void setDicts(Map<String, Dictionary> dicts) {
		this.dicts = dicts;
	}

	public Dictionary borrow(String dictionaryName) {
		Dictionary dict = dicts.get(dictionaryName);
		if ( dict == null) return null;
		dict.initial();
		return dict;
	}

}
